def make_chocolate(small, big, goal):
  a= min(goal//5,big)
  b=goal-a*5
  if b <= small:
    return small
  else:
    return -1